#include "stdafx.h"
#include "Helper.h"

Helper * Helper::msInstance = NULL;

Helper::Helper()
{
	msInstance = this;

	mLookFeel_White =  new MGUI_LookFeel("White");
	mLookFeel_White->SetSkin(MGUI_Helper::Instance()->GetWhiteTexture());
	mLookFeel_White->SetUVRect(MGUI_WidgetState::Normal, MGUI_Rect(true, 0, 0, 4, 4));
	mLookFeel_White->SetUVRect(MGUI_WidgetState::Disabled, MGUI_Rect(true,0, 0, 4, 4));
	mLookFeel_White->SetUVRect(MGUI_WidgetState::Focused, MGUI_Rect(true, 0, 0, 4, 4));
	mLookFeel_White->SetUVRect(MGUI_WidgetState::Pressed, MGUI_Rect(true, 0, 0, 4, 4));
}

Helper::~Helper()
{
	delete mLookFeel_White;

	msInstance = NULL;
}

MGUI_LookFeel * Helper::GetLookFeel_White()
{
	return mLookFeel_White;
}

MGUI_LookFeel * Helper::GetLookFeel_GengDi()
{
	return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "GengDi");
}

MGUI_LookFeel * Helper::GetLookFeel_KongDi()
{
	return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "KongDi");
}

MGUI_LookFeel * Helper::GetLookFeel_Build(eBuildType::enum_t type)
{
	switch (type)
	{
	case eBuildType::BT_ZhuangJia:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "ZhuangJia");

	case eBuildType::BT_KuangChang:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "ShuLin");

	case eBuildType::BT_MinFang:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "MinFang");

	case eBuildType::BT_ShiChang:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "ShiChang");

	case eBuildType::BT_CangKu:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "CangKu");

	case eBuildType::BT_TieJiangPu:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "TieJiangPu");

	case eBuildType::BT_YiGuan:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "YiGuan");

	case eBuildType::BT_BingYing:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "BingYing");

	case eBuildType::BT_NeiWuFu:
		return MGUI_LookFeelManager::Instance()->GetLookFeel(MGUI_WidgetType::User, "NeiWuFu");
	}
}
